var mongoose = require('mongoose');
var util = require('util');

if(!process.argv[2] || !process.argv[3])
	process.exit(1);

var first = process.argv[2];
var last = process.argv[3];

connection = mongoose.createConnection('mongodb://127.0.0.1/rush');
model = {};
require('../Models/User');

model.User.update({firstName : first, lastName : last}, {type : 'Administrator'}, function(e) {
	if(e) {
		util.puts('Shit.');
		util.puts(e.message);
		process.exit(1);
	} else {
		util.puts('Done.');
		process.exit(0);
	}
});
